<?php

class forumTopicTable extends Doctrine_Table
{
	public function getActiveTopics(){
		$q =Doctrine_Query::create()
		  ->from ('forumTopic as topic')
		  ->where ('topic.isActive=?',1)
		  ->orderby('topic.id DESC');
		
		return $q->execute();
	}
	public function getActiveTopics2(){
		$q =Doctrine_Query::create()
		  ->from ('forumTopic as topic')
          ->innerJoin('topic.forumCategory cat')
          ->innerJoin('topic.forumMembers member')
          ->innerJoin('member.sfGuardUser u')
		  ->where ('topic.isActive=?',1)
		  ->orderby('topic.id DESC');
		  
		return $q->execute();
	}
}